//
//  Toast.swift
//  SearchHeader
//
//  Created by 万孟超 on 2023/10/16.
//

import Cocoa
import SnapKit

class Toast: BaseVC {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do view setup here.
    }
    
    lazy var titleLabel: NSTextField = {
        let tf = NSTextField()
        tf.isVerticalCenter = true
        tf.font = .systemFont(ofSize: 14)
        tf.isBordered = false
        tf.isEditable = false
        tf.textColor = .black
        tf.bezelStyle = .roundedBezel
        tf.stringValue = titleString!
        tf.backgroundColor = .clear
        return tf
    }()
    
    private var titleString: String? {
        didSet {
            
        }
    }
    
    convenience init(title: String) {
        self.init(size: NSSize(width: 90, height: 50))
        self.titleString = title
    }
    
    override func installSubViews() {
        view.addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make in
            make.left.equalTo(10)
            make.height.equalTo(40)
            make.center.equalToSuperview()
        }
    }
}
